﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />


<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="ihg-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  
  <div class="container-fluid ihg-container">

    <div class="ihg-content-layout has-operation">
      <div class="text-right" style="margin: 10px 0 20px;">
        <a href="${ctx.host}/home" style="color: #155CB2; font-size: 16px;"><<&nbsp;<fmt:message key="assessor.super.1" /></a>
      </div>
      
      
      <div class="row">
        <div class="form-horizontal ihg-form">
          
          <div class="col-xs-6">
            <div class="panel panel-default ihg-panel">
              <div class="panel-heading">
                <span class="panel-titles text-success" style="font-size: 13px; font-weight: bold;"><i class="glyphicon glyphicon-th-large" style="top: 2px;"></i>&nbsp;&nbsp;Session Info</span>
              </div>
              
              <div class="panel-body" style="padding: 15px 0;">
                <div class="form-horizontal ihg-form">
                
                  <div class="form-group ihg-form-group">
                    <label class="control-label col-xs-3">Session Name:</label>
                    <div class="col-xs-7">
                      <p class="form-control-static">${session.name}</p>
                    </div>
                  </div>
                
                  <div class="form-group ihg-form-group">
                    <label class="control-label col-xs-3">Date :</label>
                    <div class="col-xs-7">
                      <p class="form-control-static">
                        <fmt:formatDate value="${session.startDate}" pattern="yyyy-MM-dd HH:mm"/>&nbsp;&nbsp;~&nbsp;&nbsp;<fmt:formatDate value="${session.endDate}" pattern="yyyy-MM-dd HH:mm"/>
                      </p>
                    </div>
                  </div>
                  
                  <div class="form-group ihg-form-group">
                    <label class="control-label col-xs-3">Assessor Owner:</label>
                    <div class="col-xs-2">
                      <p class="form-control-static">${session.assessorOwner.name}</p>
                    </div>
                  </div>
                  <div class="form-group ihg-form-group">
                    <label class="control-label col-xs-3">Delegate Owner:</label>
                    <div class="col-xs-3">
                      <p class="form-control-static">${session.delegateOwner.name}</p>
                    </div>
                  </div>
                  
                </div>
              </div>
            </div>
          </div>
          
          <div class="col-xs-6">
             
             <div class="panel panel-default ihg-panel">
              <div class="panel-heading">
                <span class="panel-titles text-success" style="font-size: 13px; font-weight: bold;"><i class="glyphicon glyphicon-th-large" style="top: 2px;"></i>&nbsp;&nbsp;在线账号开设</span>
              </div>
              
              <div class="panel-body" style="padding: 15px 0;">
                <div class="form-horizontal ihg-form">
                
                  <div class="form-group ihg-form-group">
                    <label class="control-label col-xs-3">模板下载:</label>
                    <div class="col-xs-7">
                      <p class="form-control-static"><a class="btn btn-defalut btn-danger" style="font-size: 14px;" href="${ctx.host}/active-sessions/${session.id}/account-template-export" style="font-size: 14px;">Download</a></p>
                    </div>
                  </div>
                
                  <div class="form-group ihg-form-group">
                    <label class="control-label col-xs-3">账号上传 :</label>
                    <div class="col-xs-7">
                      <p class="form-control-static">
                        <a class="btn btn-defalut btn-primary" style="font-size: 14px;" href="${ctx.host}/active-sessions/${session.id}/account-upload" data-target="#upload" data-toggle="modal">Upload</a>
                      </p>
                    </div>
                  </div>
                  
                  <div class="form-group ihg-form-group">
                    <label class="control-label col-xs-3">截止日期:</label>
                    <div class="col-xs-7">
                      <p class="form-control-static"><fmt:formatDate value="${accountUploadDate}" pattern="yyyy-MM-dd"/></p>
                    </div>
                  </div>
                  
                </div>
              </div>
            </div>
           </div>
          
        </div>
      </div>
      
      <div class="row">
        <div class="form-horizontal ihg-form" id="progress">
          <div class="panel panel-default ihg-panel">
            <div class="panel-heading">
              <span class="panel-titles text-success" style="font-size: 13px; font-weight: bold;"><i class="glyphicon glyphicon-th-large" style="top: 2px;"></i>&nbsp;&nbsp;在线报告确认</span>
            </div>
            
            <div class="panel-body" style="padding: 15px 0;">
              <table class="table table-hover ihg-table tab-pane table-striped">
                <thead>
                  <tr>
                    <th></th>
                    <th>WAVE Evaluation</th>
                    <th>SWIFT Evaluation</th>
                    <th>OPT</th>
                  </tr>
                </thead>
                <tbody>
                  <c:forEach items="${delegates}" var="delegate">
                    <tr>
                      <td>${delegate.name}</td>
                      <td><fmt:formatDate value="${sessionTasks[delegate.idString]['Wave Evaluation'].endDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                      <td><fmt:formatDate value="${sessionTasks[delegate.idString]['Swift Evaluation'].endDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                      <td>
                        <c:if test="${!sessionTasks[delegate.idString]['Wave Evaluation'].status.finish}">
                          <a style="font-size: 14px;" href="${ctx.host}/active-sessions/${session.id}/session-tasks/${sessionTasks[delegate.idString]['Wave Evaluation'].id}/confirm-evaluation" data-target="#confirm" data-toggle="modal">Confirm Wave</a>&nbsp;&nbsp;
                        </c:if>
                        <c:if test="${!sessionTasks[delegate.idString]['Swift Evaluation'].status.finish}">
                          <a style="font-size: 14px;" href="${ctx.host}/active-sessions/${session.id}/session-tasks/${sessionTasks[delegate.idString]['Swift Evaluation'].id}/confirm-evaluation" data-target=""#confirm"" data-toggle="modal">Confirm Swift</a>
                        </c:if>
                      </td>
                    </tr>
                  </c:forEach>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
      
      <div class="row">
        
        <div class="form-horizontal ihg-form" id="progress">
         
           <div class="col-xs-6">
             
             <div class="panel panel-default ihg-panel">
              <div class="panel-heading">
                <span class="panel-titles text-success" style="font-size: 13px; font-weight: bold;"><i class="glyphicon glyphicon-th-large" style="top: 2px;"></i>&nbsp;&nbsp;在线报告上传</span>
              </div>
              
              <div class="panel-body" style="padding: 15px 0;">
                <div class="form-horizontal ihg-form">
                
                  <div class="form-group ihg-form-group">
                    <label class="control-label col-xs-3">上传:</label>
                    <div class="col-xs-7">
                      <p class="form-control-static">
                        <a class="btn btn-defalut btn-primary" style="font-size: 14px;" href="${ctx.host}/active-sessions/${session.id}/report-upload" data-target="#upload" data-toggle="modal">Upload</a>
                      </p>
                    </div>
                  </div>
                  
                  <div class="form-group ihg-form-group">
                    <label class="control-label col-xs-3">截止日期:</label>
                    <div class="col-xs-7">
                      <p class="form-control-static"><fmt:formatDate value="${reportUploadDate}" pattern="yyyy-MM-dd"/></p>
                    </div>
                  </div>
                
                </div>
                
                <c:if test="${not empty sessionReports[delegates[0].idString].waveReport}">
                  <table class="table table-hover ihg-table tab-pane table-striped">
                    <thead>
                      <tr>
                        <th></th>
                        <th>WAVE REPORT</th>
                        <th>SWIFT REPORT</th>
                      </tr>
                    </thead>
                    <tbody>
                      <c:forEach items="${delegates}" var="delegate">
                        <tr>
                          <td>${delegate.name}</td>
                          <td><a class="btn btn-defalut btn-danger" style="font-size: 14px;color:#fff;" href="${sessionReports[delegate.idString].waveReport}" download="report">Wave Report</a></td>
                          <td><a class="btn btn-defalut btn-danger" style="font-size: 14px;color:#fff;" href="${sessionReports[delegate.idString].swiftReport}" download="report">Swift Report</a></td>
                        </tr>
                      </c:forEach>
                    </tbody>
                  </table>
                </c:if>
              </div>
            </div>
           </div>
           
           <div class="col-xs-6">
             <div class="panel panel-default ihg-panel">
              <div class="panel-heading">
                <span class="panel-titles text-success" style="font-size: 13px; font-weight: bold;"><i class="glyphicon glyphicon-th-large" style="top: 2px;"></i>&nbsp;&nbsp;在线数据上传</span>
              </div>
              <div class="panel-body" style="padding: 15px 0;">
                <div class="form-horizontal ihg-form">
                  <div class="form-group ihg-form-group">
                    <label class="control-label col-xs-3">上传:</label>
                    <div class="col-xs-7">
                      <p class="form-control-static">
                        <a class="btn btn-defalut btn-primary" style="font-size: 14px;" href="${ctx.host}/active-sessions/${session.id}/data-upload" data-target="#upload" data-toggle="modal">Upload</a>
                      </p>
                    </div>
                  </div>
                  <c:if test="${not empty sessionAttributes['wave-data'] and not empty sessionAttributes['swift-data']}">
                    <div class="form-group ihg-form-group">
                      <label class="control-label col-xs-3">已上传文件:</label>
                      <div class="col-xs-7">
                        <p class="form-control-static">
                          <a class="btn btn-defalut btn-danger" style="font-size: 14px;" href="${sessionAttributes['wave-data'].value}" download="report">Wave Data</a>
                          &nbsp;&nbsp;<a class="btn btn-defalut btn-danger" style="font-size: 14px;" href="${sessionAttributes['swift-data'].value}" download="report">Swift Data</a>
                        </p>
                      </div>
                    </div>
                  </c:if>
                  <div class="form-group ihg-form-group">
                    <label class="control-label col-xs-3">截止日期:</label>
                    <div class="col-xs-7">
                      <p class="form-control-static"><fmt:formatDate value="${reportUploadDate}" pattern="yyyy-MM-dd"/></p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
           </div>
           
        </div>
      </div>
      
      <div class="row">
        <div class="ihg-content-layout" style="margin-top: 0">
          <div class="col-sm-6">
            <div class="panel panel-default ihg-panel">
              <div class="panel-heading">
                <span class="panel-titles text-info" style="font-size: 13px;font-weight: bold;">
                  <i class="glyphicon glyphicon-list" style="top: 2px;"></i>&nbsp;&nbsp;报告精修
                </span>
              </div>
              <div class="panel-body" style="padding: 30px;">
                <a class="btn btn-defalut btn-danger" style="font-size: 14px; width: 200px; line-height: 40px;" href="${ctx.host}/sessions/${session.id}/supervisor-calibrations">报告精修</a>
              </div>
            </div>
          </div>
        
        </div>
      </div>
    </div>
  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <%-- <d:resource root="${ctx.resource}/build" type="script" src="js/page/session/preparation/home/session-preparation-home.js" />
  <script type="text/javascript">
    require([ 'page/session/preparation/home/session-preparation-home'], function (page) {
      page.init();
    })
  </script> --%>
  
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/session/during/supervisor-calibration/report-edit.js" />
  <script type="text/javascript">
    require([ 'page/session/during/supervisor-calibration/report-edit'], function (page) {
      page.init();
    })
  </script>

</body>
</html>